/* $Id: AppEntry.java 89 2008-01-22 02:38:52Z osborn.steven $
 * 
 * Undroid Package Manager
 *
 * Copyright 2007 Steven Osborn
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 */
package com.bitsetters.undroid;

import java.util.ArrayList;
import java.util.List;

/**
 * Simple application class that holds repository information.
 * 
 * @author Steven Osborn - http://steven.bitsetters.com
 */
public class AppEntry {
    
    public int appId = -1;
    public int repoId = -1;
    public String label = "";
    public String package_name = "";
    public String category = "";
    public String version = "";
    public int release = 0;
    public String location = "";
    public int size = 0;
    public String author = "";
    public String website = "";
    public String summary = "";
    public String description = "";
    public String license = "";
    public String license_href = "";
    public String copyright = "";
    public String checksum = "";
    public List<Integer> categories = new ArrayList<Integer>();
    
    /**
     * 
     */
    public AppEntry() {
        
    }
    
    /**
     * Return a readable representation of the object.
     */
    public String toString() {
        StringBuilder s = new StringBuilder();
        
        s.append("Id: " + this.appId + ", ");
        s.append("repoId: " + this.repoId + ", ");
        s.append("label: " + this.label + ", ");
        s.append("cateogry: (");
        
        for(int i=0; i < categories.size(); i++) {
            s.append(categories.get(i) + ",");
        }
        s.append(")");
        
        s.append("version: " + this.version + ", ");
        s.append("release: " + this.release + ", ");
        s.append("location: " + this.location + ", ");
        s.append("size: " + this.size + ", ");
        s.append("author: " + this.author + ", ");
        s.append("website: " + this.website + ", ");
        s.append("summary: " + this.summary + ", ");
        s.append("description: " + this.description + ", ");
        s.append("license: " + this.license + ", ");
        s.append("license href: " + this.license_href + ", ");
        s.append("copyright: " + this.copyright + ", ");
        s.append("checksum: " + this.checksum);
        
        return s.toString();
    }
    
}
